Skip to content

Align settleFilBeamPaymentRails to FilecoinPay v2 - #684

Merged
Filip-L merged 1 commit into
feat/filecoin-pay-v2from
fwss-pay-v2-settle-filbeam
Dec 1, 2026
Merged

Filip-L merged 1 commit into
feat/filecoin-pay-v2from
fwss-pay-v2-settle-filbeam

Conversation

@Filip-L

@Filip-L Filip-L commented Nov 27, 2026 •

Copy link
Copy Markdown
Collaborator

settleFilBeamPaymentRails now also handles FilecoinPayV2 data sets. The storage terms pick the path. FilecoinPayV1 is unchanged. On FilecoinPayV2, one script disburses the amounts from the CDN and cache-miss rail locks. FWSSFilBeamModule takes _filBeamBeneficiaryAddress in its constructor, because FilecoinPayV2 needs the recipient to address the CDN rail.

Part of #669

Open question: should we add an event, e.g. CDNPaymentRailsSettled(dataSetId, cdnAmount, cacheMissAmount)?

@FilOzzy FilOzzy added this to FOC Nov 27, 2026
@github-project-automation github-project-automation Bot moved this to 📌 Triage in FOC Nov 27, 2026
@FilOzzy FilOzzy moved this from 📌 Triage to 🔎 Awaiting review in FOC Nov 27, 2026
}
ScriptBuilder script = newScript().setToken(token);
if (cdnAmount > 0) {
uint64 cdnNonce = CDN_RAIL_NONCE_FLAG | uint64(dataSetId);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we need to have CDN_RAIL_NONCE_FLAG because we can use the same nonce for both rails, if we assume filBeamBeneficiaryAddress != payee.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The flag comes from createRails, which this PR doesn't touch. I'll open the topUpCDNRails PR on top of this one, then a follow-up that drops CDN_RAIL_NONCE_FLAG in createRails, settleCDNRails and topUpCDNRails at once.

@github-project-automation github-project-automation Bot moved this from 🔎 Awaiting review to ✔️ Approved by reviewer in FOC Dec 1, 2026
@Filip-L
Filip-L merged commit 759f095 into feat/filecoin-pay-v2 Dec 1, 2026
7 checks passed
@Filip-L
Filip-L deleted the fwss-pay-v2-settle-filbeam branch December 1, 2026 17:49
@github-project-automation github-project-automation Bot moved this from ✔️ Approved by reviewer to 🎉 Done in FOC Dec 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 🎉 Done

Development

Successfully merging this pull request may close these issues.

2 participants